home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15343 < prev    next >
Encoding:
Text File  |  1996-08-05  |  957 b   |  48 lines

  1. Path: dish.news.pipex.net!pipex!dircon!usenet
  2. From: Kai Chan <kai@cell.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: ===  **ptr  QUES  ===
  5. Date: Thu, 18 Apr 1996 17:47:03 +0100
  6. Organization: Direct Connection
  7. Message-ID: <31767207.167E@cell.co.uk>
  8. NNTP-Posting-Host: cell.co.uk
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP22)
  13.  
  14. Hi,
  15.     I've got the following code fragment. Question I've got concerns
  16. passing the pointer to a pointer to func1, and that is: which is
  17. correct?
  18.  
  19. blar...
  20. blar...
  21.  
  22. main()
  23. {
  24.     some_type1    **ptr;
  25.  
  26.     func1(ptr);    /* is this right? */
  27.     func1(&ptr);    /* or this? */
  28.     func1(**ptr);    /* or this? */
  29.     func1(*ptr);    /* or this? */
  30.     
  31. }
  32.  
  33. func1(some_type1 **ptr)
  34. {
  35.     blar...
  36.     blar...
  37. }
  38.  
  39. Thanx in advance.
  40. Kai
  41. -- 
  42. *:(*:(*:(*:(*:(*:(*:(*:(*:(*:(*:(*:(
  43. Kai Chan [ kai@cell.co.uk ]
  44. Cell 59-61 Charlotte St
  45. London W1P 1LA
  46. 0171-2081500
  47. *:)*:)*:)*:)*:)*:)*:)*:)*:)*:)*:)*:)
  48.